package com.bluesky.javawebbrowser.domain.html.tags;

import java.io.IOException;
import java.io.Writer;
import java.util.Iterator;

import com.bluesky.common.TreeNode;

public class Root extends Tag {
	public Root() {
		super(TagType.ROOT);
	}

	public Root(Tag tag) {
		super(TagType.ROOT);
		copy(tag);
	}

	@Override
	public void writeHtml(Writer writer) throws IOException {
		// children
		Iterator<TreeNode> itChildren = getChildren().iterator();

		while (itChildren.hasNext()) {

			Tag tag = (Tag) itChildren.next();
			tag.writeHtml(writer);

		}
	}
}
